import * as types from '../actions/actionTypes';

const initialState = {
    userinfo : {},
    'getting' : false,
};

let mineReducer = (state = initialState, action) => {

     switch(action.type)
     {
        case types.FETCH_USER_INFO :
            return {
                 ...state,
                 'getting' : action.getting,
            }
        case types.RECEIVE_USER_INFO :
            return Object.assign({}, state, {
                userinfo: action.userinfo,
                'getting' : action.getting,
            })
        default : 
             return state;
     }
}

export default mineReducer;